<?php echo $this->fetch('header.html'); ?>
<script>
    $(function(){
        $(".index-header").hide();
        $(".tab-more").attr('style',"left:"+($(window).width()-137)+"px");
       
        var ju_nav_length=$(window).width()-90-47;

            var tab_length=0;
            for(i=0;i<$(".tabs-bd a").index($(".tabs-bd a.active"));i++){
                tab_length+=$(".tabs-bd a:eq("+i+")").width()+24;
            }
  
 
                $(".tabs-cnt").attr("style","left:-"+tab_length+"px;position:relative");

           

    })
</script>
<script>
    function show_mask(obj){
        if(!obj.hasClass('tab-more-open')){  
            obj.addClass('tab-more-open');$('.more-wp').addClass('more-wp-open');
        }
        else{
            obj.removeClass('tab-more-open');$('.more-wp').removeClass('more-wp-open');
        }
    }
    //
</script>
<div id="ju">
<div class="header-wp">
     <nav class="tabs-bar" >
    <div class="tabs-wp" >
      <a class="tab tab-all <?php if ($this->_var['ju_nav_cate'] == - 1): ?>active<?php endif; ?>"  href="<?php echo url('app=ju'); ?>" style="background-image: url(<?php echo $this->_var['site_url']; ?>/<?php echo $this->_var['wap_site_logo']; ?>)">聚划算</a>
      <div class="tabs-cnt">
        <div class="clearfix tabs-bd" >
            <a href="<?php echo url('app=ju'); ?>&ju_cate=0" class="tab <?php if ($this->_var['ju_nav_cate'] == 0): ?>active<?php endif; ?>">品牌团</a>
            <?php $_from = $this->_var['ju_cate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cate');$this->_foreach['fe_cate'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_cate']['total'] > 0):
    foreach ($_from AS $this->_var['cate']):
        $this->_foreach['fe_cate']['iteration']++;
?>
    		              <a href="<?php echo url('app=ju'); ?>&ju_cate=<?php echo $this->_var['cate']['id']; ?>" class="tab <?php if ($this->_var['ju_nav_cate'] == $this->_var['cate']['id']): ?>active<?php endif; ?>" ><?php echo $this->_var['cate']['value']; ?></a>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    </div>
      </div>
      <a class="tab tab-more" href="javascript:;" onclick="show_mask($(this))"></a>
    </div>

  </nav>
</div>
<div class=" widget search-wp" >
    <div class="clearfix widgets-hd" >
        <input type="text" placeholder="搜索其实很容易" id="ju_keyword" value="<?php echo $_GET['keyword']; ?>"/>
        <a href="javascript:void(0)" onclick="window.location.href='<?php echo url('app=ju'); ?>&keyword='+$('#ju_keyword').val()" class="search"></a>
    </div>
</div>
<div class="more-wp ">
  <div class="mask "></div>
  <div class="more-cnt" >
    <div class=" more-bd" >
      <div class="block clearfix" >
          
          <?php $_from = $this->_var['ju_cate']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cate');$this->_foreach['fe_cate'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_cate']['total'] > 0):
    foreach ($_from AS $this->_var['cate']):
        $this->_foreach['fe_cate']['iteration']++;
?>
          <?php if ($this->_foreach['fe_cate']['iteration'] == 1): ?>
      	       <div class="block-group">
                   <a href="<?php echo url('app=ju'); ?>&ju_cate=0" class="tab J_Tab">品牌团</a>
          <?php endif; ?>
          <?php if ($this->_foreach['fe_cate']['iteration'] % 4 == 0): ?>
      	       <div class="block-group">
                  
          <?php endif; ?>
                    <a class="tab"  href="<?php echo url('app=ju'); ?>&ju_cate=<?php echo $this->_var['cate']['id']; ?>"><?php echo $this->_var['cate']['value']; ?></a>
          <?php if ($this->_foreach['fe_cate']['iteration'] % 4 == 3 || ($this->_foreach['fe_cate']['iteration'] == $this->_foreach['fe_cate']['total'])): ?>
      	       </div>
          <?php endif; ?>

          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

      </div>

   
    </div>
  </div>
</div>
    
    <div class="ju_goods">
<?php $_from = $this->_var['ju_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'ju');$this->_foreach['fe_ju'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_ju']['total'] > 0):
    foreach ($_from AS $this->_var['ju']):
        $this->_foreach['fe_ju']['iteration']++;
?>
        <a href="<?php echo url('app=ju&act=show&id=' . $this->_var['ju']['group_id']. ''); ?>" class="com-wgt">
            <div class="com-wp">
                <div class="clearfix com-cnt">
                    <div class="com-pic">
                        <img  class="lazyload" initial-url="<?php echo $this->_var['site_url']; ?>/<?php echo $this->_var['ju']['default_image']; ?>">
                    </div>
                    <div class="com-info clearfix"><div class="com-title"><span><?php echo htmlspecialchars($this->_var['ju']['group_name']); ?></span></div>
                        <div class="origin-price"><i>¥</i><i class="money"><?php echo $this->_var['ju']['group_price']; ?></i></div>
                        <del class="old-price"><i>¥</i><i class="money"><?php echo $this->_var['ju']['price']; ?></i></del>
                        <span class="sale-stat"><?php if ($this->_var['ju']['all_count']): ?> <?php echo $this->_var['ju']['all_count']; ?> <?php else: ?> 0 <?php endif; ?>件已售</span>
                    </div>
                </div>
            </div>
        </a>
          <?php endforeach; else: ?>
            <div class="null">
                <p>没有符合条件的记录~</p>
            </div>
<?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
<?php echo $this->fetch('page.bottom.html'); ?>
    </div>
    
    
</div>
<?php echo $this->fetch('footer.html'); ?>